
lexer grammar GameLexer;

@header {
package org.moflon.moca.game.parser;
import org.moflon.moca.MocaUtil;
}
 
WS:(' ' | '\t' | '\n' | '\r')+ { skip(); };

GAME: 'GAME'; 

GAME_NAME: 'gameName:';

BOARD: 'board';

WIDTH: 'width';

HEIGHT: 'height';

FIGURE: 'figure';

FIGURES: 'figures';


PIECE_NAME: 'piece_name';

PIECE: 'piece';



QUOTED_STRING: '"' .* '"' { MocaUtil.trim(this, 1, 1); };


POS_X: 'pos_x';

POS_Y: 'pos_y';

COLON:':';

RULE: 'rule';

SET: 'set';

DIRECTION: 'direction';

EMPTY: 'empty';

DESTROY: 'destroy';

GOUP: 'up';

GOLEFT: 'left';

GODOWN: 'down';

GORIGHT: 'right';

FIGURE_NAME: ('a'..'z')*;

NUMBER: ('0' .. '9')*;

OPEN: '{';

CLOSE: '}';

SEPERATOR: ';';
  
